<template>
  <div v-show="$store.state.design.shadeState === 5" class="sharebox">
    <div class="closesave" @click="closeShare" />
    <div id="sharetitle" class="sharetitle">{{ $store.state.design.title }}</div>
    <div id="mysharebox" />
    <div
      class="a2a_kit a2a_kit_size_32 a2a_default_style sharebottom"
      :data-a2a-url="$store.state.design.shareUrl"
    >
      <!-- <a class="a2a_dd" href="https://www.addtoany.com/share"></a> -->
      <a class="a2a_button_facebook" />
      <a class="a2a_button_twitter" />
      <a class="a2a_button_linkedin" />
      <a class="a2a_button_pinterest" />
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    closeShare() {
      $('#mycanvas').append($('#canvasbox'));
      this.$store.commit('design/setShadeState', 0);
      this.$nextTick(function() {
        window.BLS && window.BLS.resize && window.BLS.resize();
      });
    }
  }
};
</script>

<style lang="scss" scoped>
.closesave{
  position: absolute;
  top: 0;
  right: 0;
  width: 99px;
  height: 99px;
  cursor: pointer;
  background: url('/static/image/cl.png') no-repeat 42px 42px;
  z-index: 1;
}
.closesave:hover{
  background-image: url('/static/image/cl1.png');
}
.sharebox {
  position: absolute;
  top:50%;
  left:50%;
  -webkit-transform: translate(-50%,-50%);
          transform: translate(-50%,-50%);
  background-color: #fff;
  width: 500px;
  height: 610px;
  border-radius: 5px;
}
.sharetitle {
  height: 29px;
  line-height: 29px;
  text-align: center;
  border-bottom: 1px solid #e0e0e1;
  font-weight: 700;
}
#mysharebox {
  position: relative;
  height: 520px;
  width: 100%;
}
.sharebottom {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
}
</style>

// WEBPACK FOOTER //
// src/components/share-box.vue
